﻿namespace EOrm.NpgsqlProvider
{
    /// <summary>
    /// postgres数据库字段
    /// </summary>
    public class PgField : IField
    {
        /// <summary>
        /// 字段名
        /// </summary>
        public string Name { get; set; } = "";
        /// <summary>
        /// 字段别名
        /// </summary>
        public string DbName { get; set; } = "";
        /// <summary>
        /// 字段类型名
        /// </summary>
        public string DbTypeName { get; set; } = "";

        /// <summary>
        /// 字段是否自动填充
        /// </summary>
        public bool IsAutoFill { get; set; } = false;

        /// <summary>
        /// 字段是否为主键
        /// </summary>
        public bool IsKey { get; set; } = false;

        /// <summary>
        /// 字段是否为空
        /// </summary>
        public bool IsNullable { get; set; } = false;

        /// <summary>
        /// 字段数据库别名是否启用分割线命名法
        /// </summary>
        public bool IsSeperated { get; set; } = true;
    }
}
